<include file="Public:head"/>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>订单列表</h5>
                    <div class="ibox-tools" style="margin-top: -9px;">
                        <a href="javascript:location.reload();" class="btn btn-primary"><i class="fa fa-refresh"></i> 刷新</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3">

                        </div>
                        <form class="form-inline" action="" method="get">
                            <div class="col-sm-10 pull-right">
                                <div class="input-group col-sm-3  pull-right">
                                    <input type="text" name="order_sn" value="{$order_sn?$order_sn:'';}" placeholder="订单编号" class="input-sm form-control select_no_border">
                                    <span class="input-group-btn">
                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                    </span>
                                </div>
                                <div class="input-group col-sm-2 pull-right select_width">
                                    <select name="status" class="input-sm form-control select_no_border">
                                        <option value="">订单状态</option>
                                        <option value="0" <if condition="$status == '0'">selected</if>>待付款  </option>
                                        <option value="1" <if condition="$status == '1'">selected</if>>已付款 </option>
                                        <option value="2" <if condition="$status == '2'">selected</if>>处理中 </option>
                                        <option value="3" <if condition="$status == '3'">selected</if>> 已完成 </option>
                                        <option value="-2" <if condition="$status == '-2'">selected</if>>已关闭 </option>
                                    </select>
                                </div>

                                <div class="input-group col-sm-3 pull-right">
                                   		<span class="input-group-addon">
						                    <span class="fa fa-calendar"></span>
						                </span>
                                    <input type="text" name="time" value="{$time?$time:'';}" placeholder="2017-06-14 - 2017-07-14" id="time" class="input-sm form-control select_no_border" id="start_time">
                                    <!-- <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span> -->

                                </div>

                            </div>
                        </form>
                    </div>

                    <br />

                    <div class="table-responsive">
                        <form action="__URL__/operate" method="post" id="operate_form">
                            <table class="table table-bordered table-hover"
                                   id="categoryTable">
                                <thead>
                                <tr class="active">
                                    <th><input onclick="choosebox(this)" type="checkbox" /></th>
                                    <th height="40">编号</th>
                                    <th>订单编号</th>
                                    <th>收货人</th>
                                    <th>联系方式</th>
                                    <th>数量</th>
                                    <th>总金额</th>
                                    <th>订单状态</th>
                                    <th>下单时间</th>
                                    <th width="80">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="data" id="vo">
                                    <tr>
                                        <td><input type="checkbox" name="order_id[]" value="{$vo['id']}" /></td>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.order_sn}</td>
                                        <td>{$vo.user}</td>
                                        <td>{$vo.mobile}</td>
                                        <td>{$vo.total_count}</td>
                                        <td>{$vo.total_price}</td>
                                        <td>{$order_status[$vo.status]}</td>
                                        <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                        <td>
                                            <a href="{:url('Order/detail',array('id'=>$vo['id'],'user'=>$vo.user))}" class="btn btn-primary">查看</a>
                                        </td>
                                    </tr>
                                </volist>

                                </tbody>
                            </table>
                        </form>
                        <div class="col-sm-12" style="padding:0px;">
                            <ul class="pagination  pull-right">
                                {$page}
                            </ul>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    //日期范围
    laydate.render({
        elem: '#time'
        ,range: true
    });
</script>

</body>

</html>